

CROSS_COMPILE = aarch64-linux-gnu-
CC	=	$(CROSS_COMPILE)gcc
AR	=	$(CROSS_COMPILE)ar
LD	=	$(CROSS_COMPILE)ld
RM	=	rm	

DIR = $(PWD)
.PHONY:  $(TARGET)	clean


LIB_PATH = //opt/hisi-linux/x86-arm/arm-hisiv500-linux/

OBJS = leds.o

LIB_NAME = libleds.so

.PHONY: all  install  clean static-lib

    	
(LIB_NAME):$(OBJS)
	$(CC)  -shared -fpic -o $(LIB_NAME)  $^

install:
	cp $(LIB_NAME) $(LIB_PATH)

clean:
	$(RM) -rf $(TARGET) *.o $(LIB_NAME)

static-lib:
	$(CC) -o leds.o -c leds.c
	$(AR) rcs aa.a leds.o

